package com.cloudfun.campusshare.entity;

import com.cloudfun.campusshare.common.constant.FeedbackSource;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "feedback")
@org.hibernate.annotations.Table(appliesTo = "feedback", comment = "意见反馈")
public class FeedbackEntity extends CreatorPersistenceEntity {

    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Column(columnDefinition = ("varchar(256) default null comment '内容'"))
    private String content;

    @Column(columnDefinition = ("varchar(32) not null comment '来源'"))
    @Enumerated(EnumType.STRING)
    private FeedbackSource source;

}